package week9th.jsjf;

import week9th.jsjf.exceptions.ArrayHeapR;

public class HeapSort<T>
{
	public void HeapSort(T[] data)
	{
		ArrayHeapR<T> temp = new ArrayHeapR<T>();

		for (int i = 0; i < data.length; i++) {
			temp.addElement(data[i]);

		}
		int count = 0;
		while (!(temp.isEmpty()))
		{
			data[count] = temp.removeMax();
			count++;
		}


	}
}


